package com.collection;

public class Animal {
    protected String name;
    protected String color;
    protected String weight;
    protected String character;//性格
    protected String food;//

    public void run(){
        System.out.println("我是:"+this.name+",我会跑");
    }

    public void eat(){
        System.out.println("我喜欢吃:"+this.food);
    }

    //设置成员变量方法
    public void setFood(String food) {
        this.food = food;
    }

    public String getFood() {
        return food;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getCharacter() {
        return character;
    }

    public void setCharacter(String character) {
        this.character = character;
    }
}
